package com.showsu.editor.utils.aliyun;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Author: jph
 * @Description: 视频转码模版枚举
 * @Date: Created in 18:35 下午 2023/12/21
 * @Modified By:
 */
@Getter
@AllArgsConstructor
public enum TranscodeTemplateEnum {
    VIDEO_4K60("4K60", "5f4ebd72de034d4c83e848cb369df1b8", "H265 4k-60帧/秒"),
    VIDEO_4K50("4K50", "1c73b36214684231b8881762eed127fc", "H265 4k-50帧/秒"),
    VIDEO_4K30("4K30", "156e655ee80142b9980e60a17a0ac7b1", "H265 4k-30帧/秒"),
    VIDEO_4K25("4K25", "50800cefe1484ea98539085a77310fb1", "H265 4k-25帧/秒"),
    VIDEO_4K24("4K24", "e8bc9e2c1e894921be365a323a02ad9d", "H265 4k-24帧/秒"),

    VIDEO_2K60("2K60", "89c4515a22ca4c8e8e2216814382928c", "H265 2k-60帧/秒"),
    VIDEO_2K50("2K50", "594d7521e8514cbeaa35fee7b94fbec0", "H265 2k-50帧/秒"),
    VIDEO_2K30("2K30", "df893e1c2ece4e06bd132dbb660af8e3", "H265 2k-30帧/秒"),
    VIDEO_2K25("2K25", "e8d540a8a0ff4d98a1777efb46925eb6", "H265 2k-25帧/秒"),
    VIDEO_2K24("2K24", "530c6894110a449fbf9d1b3e8b4c0557", "H265 2k-24帧/秒"),

    VIDEO_1080P60("1080P60", "8218338803d74519b40c6f3c9897cfb7", "H265 1080P-60帧/秒"),
    VIDEO_1080P50("1080P50", "6d34822c7405421aa30e188313c266bb", "H265 1080P-50帧/秒"),
    VIDEO_1080P30("1080P30", "c1c5130bb64b40c392c5367811d5b186", "H265 1080P-30帧/秒"),
    VIDEO_1080P25("1080P25", "bbd8d24b898d461da413fdbfc6b1d66a", "H265 1080P-25帧/秒"),
    VIDEO_1080P24("1080P24", "b7d88f924f4141178a0725b30acbf69e", "H265 1080P-24帧/秒"),

    VIDEO_720P60("720P60", "15631a9a7d0349eb9331b3feb20fba1c", "H265 720P-60帧/秒"),
    VIDEO_720P50("720P50", "093e22bc92e7422196bec64a25690ba9", "H265 720P-50帧/秒"),
    VIDEO_720P30("720P30", "5ba5d60219a048299264a227f89b7bd3", "H265 720P-30帧/秒"),
    VIDEO_720P25("720P25", "0805bfc3c3f04836ae17a8c12486de0b", "H265 720P-25帧/秒"),
    VIDEO_720P24("720P24", "5608ba6e844b4b90af4372aeebf4fb85", "H265 720P-24帧/秒"),

    VIDEO_540P60("540P60", "0e1b96e01a9d456b9d6a3e43e3c4860b", "H265 540P-60帧/秒"),
    VIDEO_540P50("540P50", "b3b1e663cd5a4671b49fb4ec6ec3d13c", "H265 540P-50帧/秒"),
    VIDEO_540P30("540P30", "8dcbc2a443c245cfaf5d2b4703050f9e", "H265 540P-30帧/秒"),
    VIDEO_540P25("540P25", "2970f5d07fa24204abd7038604736173", "H265 540P-25帧/秒"),
    VIDEO_540P24("540P24", "3f4d61b2576f4e11872295a8b4266081", "H265 540P-24帧/秒"),

    TO_MP4("toMP4", "48eabb6ef27d47a4a687edfb1c17f3c1", "转封装mp4"),

    ;

    /**
     * 编码
     */
    final String code;

    /**
     * 阿里云短信模版编码
     */
    final String templateId;

    /**
     * 描述
     */
    final String desc;

    public static TranscodeTemplateEnum getByCode(String code) {
        for (TranscodeTemplateEnum templateEnum : TranscodeTemplateEnum.values()) {
            if (templateEnum.getCode().equals( code)) {
                return templateEnum;
            }
        }
        return null;
    }
}
